<template>
<div>
  <van-nav-bar
  title="我的设备"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
<div class="device-list-container">
      <van-cell-group>
        <van-cell
          v-for="(device, index) in devices"
          :key="index"
          :title="device.title"
          :label="`设备平台：${device.platform}
          设备型号：${device.model}租赁周期：${device.rentPeriod}绑定人：${counterStore.useStore.userName}`"
          :border="false"
          :icon="device.icon"
        />
      </van-cell-group>
    </div>
    
</div>
  </template>
  
  <script setup lang="ts">
  import { useCounterStore } from '@/stores/counter';
  const counterStore = useCounterStore();
  const onClickLeft = () => history.back();
  const devices = [
    {
      title: '居家血压检测仪',
      platform: '欧姆尼',
      model: 'SN00122',
      rentPeriod: '2022-07-01 - 2023-07-01',
      bindPerson: '张三',
      icon: 'healthcare'
    },
    {
      title: '血糖仪',
      platform: '欧姆尼',
      model: 'SN00122',
      rentPeriod: '2022-07-01 - 2023-07-01',
      bindPerson: '张三',
      icon: 'water-drop'
    }
  ];
  </script>
  
  <style scoped>
  .device-list-container {
    padding: 16px;
  }
  </style>